package com.ruoyi.web.tdm.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.web.tdm.mapper.TdmSePuZhiShiKuMapper;
import com.ruoyi.web.tdm.domain.TdmSePuZhiShiKu;
import com.ruoyi.web.tdm.service.ITdmSePuZhiShiKuService;

/**
 * 色谱知识库管理Service业务层处理
 * 
 * @author ly
 * @date 2022-03-14
 */
@Service
public class TdmSePuZhiShiKuServiceImpl implements ITdmSePuZhiShiKuService 
{
    @Autowired
    private TdmSePuZhiShiKuMapper tdmSePuZhiShiKuMapper;

    /**
     * 查询色谱知识库管理
     * 
     * @param id 色谱知识库管理主键
     * @return 色谱知识库管理
     */
    @Override
    public TdmSePuZhiShiKu selectTdmSePuZhiShiKuById(Long id)
    {
        return tdmSePuZhiShiKuMapper.selectTdmSePuZhiShiKuById(id);
    }

    /**
     * 查询色谱知识库管理列表
     * 
     * @param tdmSePuZhiShiKu 色谱知识库管理
     * @return 色谱知识库管理
     */
    @Override
    public List<TdmSePuZhiShiKu> selectTdmSePuZhiShiKuList(TdmSePuZhiShiKu tdmSePuZhiShiKu)
    {
        return tdmSePuZhiShiKuMapper.selectTdmSePuZhiShiKuList(tdmSePuZhiShiKu);
    }

    /**
     * 新增色谱知识库管理
     * 
     * @param tdmSePuZhiShiKu 色谱知识库管理
     * @return 结果
     */
    @Override
    public int insertTdmSePuZhiShiKu(TdmSePuZhiShiKu tdmSePuZhiShiKu)
    {
        tdmSePuZhiShiKu.setCreateTime(DateUtils.getNowDate());
        return tdmSePuZhiShiKuMapper.insertTdmSePuZhiShiKu(tdmSePuZhiShiKu);
    }

    /**
     * 修改色谱知识库管理
     * 
     * @param tdmSePuZhiShiKu 色谱知识库管理
     * @return 结果
     */
    @Override
    public int updateTdmSePuZhiShiKu(TdmSePuZhiShiKu tdmSePuZhiShiKu)
    {
        tdmSePuZhiShiKu.setUpdateTime(DateUtils.getNowDate());
        return tdmSePuZhiShiKuMapper.updateTdmSePuZhiShiKu(tdmSePuZhiShiKu);
    }

    /**
     * 批量删除色谱知识库管理
     * 
     * @param ids 需要删除的色谱知识库管理主键
     * @return 结果
     */
    @Override
    public int deleteTdmSePuZhiShiKuByIds(Long[] ids)
    {
        return tdmSePuZhiShiKuMapper.deleteTdmSePuZhiShiKuByIds(ids);
    }

    /**
     * 删除色谱知识库管理信息
     * 
     * @param id 色谱知识库管理主键
     * @return 结果
     */
    @Override
    public int deleteTdmSePuZhiShiKuById(Long id)
    {
        return tdmSePuZhiShiKuMapper.deleteTdmSePuZhiShiKuById(id);
    }
}
